.header {
  box-sizing: border-box;
  background-color: #c50097;
  height: 80px;
  max-height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 2;
  width: 100%;
  max-width: 1600px;
  border-bottom: 1px dashed #000;
  padding: 0 20px;

  &_black {
    background-color: #000;
    padding: 0 0 3px 13px;
    align-items: flex-end;
    border: 0;
    justify-content: start;
    gap: 5px;
  }

  &__logo {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 40px;
    max-height: 40px;
    background: url('../../images/icons/clown.svg') no-repeat center / 100%;
  }

  &__title {
    color: #c50097;
    margin: 0;
    padding: 0;
    font-size: 24px;
    line-height: 1;
    font-weight: 500;
    text-shadow: 1px 1px #d4d714;
  }

  &__links,
  &__wrapper,
  &__signin,
  &__signup,
  &__link_account,
  &__menu_links,
  &__menu_account,
  &__menu_container {
    display: flex;
    align-items: center;
  }

  &__links {
    gap: 30px;
  }

  &__wrapper {
    justify-content: space-between;
    gap: 30px;
    height: 75%;
  }

  &__wrapper_films {
    gap: 20px;
    height: 30px;
  }

  &__signup,
  &__signin {
    font-size: 16px;
    line-height: 1;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-decoration: none;
    color: #000;
    height: 70%;
    justify-content: center;
  }

  &__signin {
    box-sizing: border-box;
    width: 100px;
    background-color: #ff0a0a;
    border-radius: 10px;
    border: 1px solid #000;
  }

  &__link {
    font-size: 14px;
    line-height: 1;
    font-weight: 400;
    text-decoration: none;
    color: #000;
  }

  &__link_account {
    gap: 13px;
    box-sizing: border-box;

    &::after {
      content: '';
      width: 30px;
      height: 30px;
      background-image: url('../../images/icons/account.svg');
      border-radius: 6px;
      background-size: 11px 11px;
      background-repeat: no-repeat;
      background-position: center;
      background-color: #ff0a0a;
      border: 1px solid #000;
    }
  }

  &__link_active,
  &__menu_link,
  &__menu_account {
    font-weight: 600;
    line-height: 1;
  }

  &__button {
    width: 35px;
    height: 35px;
    max-width: 35px;
    max-height: 35px;
    border: 1px solid #000;
    display: none;
    padding: 0;
    outline: 0;
    background: #ff0a0a url('../../images/icons/burger.svg') no-repeat center / contain;
  }

  &__menu {
    display: none;
    background: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
    position: fixed;
    width: 100%;
    height: 100vh;
    top: 0;
    left: 0;
    visibility: hidden;
    opacity: 0;
    transition: all 0.5s ease;

    &_opened {
      visibility: visible;
      opacity: 1;
    }
  }

  &__menu_container {
    position: fixed;
    top: 0;
    right: 0;
    box-sizing: border-box;
    width: 520px;
    height: 100%;
    background-color: #fff;
    flex-direction: column;
    justify-content: space-between;
    gap: 30px;
  }

  &__menu_top {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 100px;
  }

  &__menu_closer {
    width: 32px;
    height: 32px;
    align-self: end;
    margin: 22px 22px 0 0;
    border: 0;
    padding: 0;
    outline: 0;
    background: transparent url('../../images/icons/black_cross.svg') no-repeat center / contain;
  }

  &__menu_links {
    flex-direction: column;
    gap: 25px;
  }

  &__menu_link {
    font-size: 18px;
    text-decoration: none;
    color: #000;
    white-space: nowrap;

    &_active {
      padding: 0 4px 4px;
      border-bottom: 2px solid #000;
    }
  }

  &__menu_account {
    gap: 13px;
    text-decoration: none;
    color: #000;
    margin-bottom: 92px;
    font-size: 14px;
    box-sizing: border-box;
    border: none;

    &::after {
      content: '';
      width: 30px;
      height: 30px;
      border-radius: 6px;
      background: #f9f9f9 url('../../images/icons/account.svg') no-repeat center / 40%;
    }
  }

  @media (max-width: 850px) {
    &__button {
      display: block;
    }

    &__menu {
      display: flex;
    }

    &__link {
      display: none;
    }
  }

  @media (max-width: 639px) {
    &__menu_container {
      width: 100%;
    }

    &__menu_top {
      gap: 18vw;
    }

    &__menu_closer {
      max-width: 22px;
      max-height: 22px;
      margin: 4vw 4vw 0 0;
      width: 7vw;
      height: 7vw;
    }
  }

  @media (max-width: 400px) {
    &__signup,
    &__signin {
      font-size: 4vw;
      height: 12vw;
    }

    &__signin {
      width: 20vw;
      border-radius: 1.5vw;
    }
  }

  @media (max-width: 320px) {
    & {
      padding: 0 6vw;
      height: 25vw;
    }

    &_black {
      padding: 0 0 1vw 2vw;
      gap: 1vw;
    }

    &__title {
      font-size: 8vw;
    }

    &__logo,
    &__button {
      width: 14vw;
      height: 14vw;
    }

    &__menu_links {
      gap: 8vw;
    }

    &__menu_link {
      font-size: 6vw;

      &_active {
        padding: 0 1vw 1vw;
        border-bottom-width: 1vw;
      }
    }

    &__menu_account {
      margin-bottom: 15vw;
      font-size: 4vw;
      gap: 3vw;

      &::after {
        width: 8vw;
        height: 8vw;
      }
    }

    &__wrapper {
      height: 14vw;
      gap: 5vw;
    }
  }
}
